package com.tuanzi.loan.web.lazy.statistics;

import com.tuanzi.loan.business.service.statistics.CreditCardManagerDataStatService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.CreditCardManagerDataStatSearchRequest;
import com.tuanzi.loan.vo.response.statistics.CreditCardManagerDataStatSearchResponse;
import org.springframework.data.domain.Page;

public class CreditCardManagerDataStatLazyModel  extends BaseLazyDataModel<CreditCardManagerDataStatSearchRequest, CreditCardManagerDataStatSearchResponse> {

    private CreditCardManagerDataStatService creditCardManagerDataStatService = SpringContextHolder.getBean(CreditCardManagerDataStatService.class);

    public CreditCardManagerDataStatLazyModel(CreditCardManagerDataStatSearchRequest creditCardManagerDataStatSearchRequest) {
        super(creditCardManagerDataStatSearchRequest);
    }

    @Override
    protected Page<CreditCardManagerDataStatSearchResponse> doLoad(PageSearcher<CreditCardManagerDataStatSearchRequest> pageSearcher) {
        return creditCardManagerDataStatService.getList(pageSearcher);
    }
}
